package be.jhd.appserver.weblogic.command;

import org.junit.Test;

import be.jhd.appserver.weblogic.DeployerCommandSender;
import be.jhd.appserver.weblogic.deployer.command.DeployerCommand;
import be.jhd.appserver.weblogic.deployer.command.ListCommand;
import be.jhd.downloader.utils.ConfigUtils;

public class WeblogicCommandSenderTestIntegration {
	
//	@Test
//	public void deploy() throws Exception{
//		WeblogicConfig config = DeployerConfigUtils.getAsDevMainServer();
//		DeployerCommand deploy = new DeployCommand(config, "webconfiguration-as-ear-3.0.4.ear", "./src/test/resources/webconfiguration-as-ear-3.0.4.ear");
//		
//		DeployerCommandSender sender = new DeployerCommandSender();
//		Assert.assertTrue(sender.send(deploy));
//	}
//	
//	@Test
//	public void undeploy() throws Exception{
//		WeblogicConfig config = DeployerConfigUtils.getAsDevMainServer();
//		DeployerCommand undeploy = new UndeployCommand(config, "webconfiguration-as-ear-3.0.4.ear");
//		
//		DeployerCommandSender sender = new DeployerCommandSender();
//		Assert.assertTrue(sender.send(undeploy));
//	}
	
	@Test
	public void list() throws Exception{
		WeblogicConfig config = ConfigUtils.getAsDevMainServer();
		DeployerCommand list = new ListCommand();
		
		DeployerCommandSender sender = new DeployerCommandSender(config);
		System.out.println("->" + sender.send(list));
	}
}
